VPATH = src include  # 添加文件搜索目录
CC = cc  # 编译器
CFLAGS = -g -Wall -I include  # 添加.h文件搜索目录

build: objs/arpping

objs/arpping: objs/carp.o objs/arp.o objs/tools.o
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ 	

objs/carp.o: main.c arp.h
	$(CC) $(CFLAGS) -c $< -o $@

objs/arp.o: arp.c arp.h tools.h
	$(CC) $(CFLAGS) -c $<  -o $@

objs/tools.o: tools.c tools.h
	$(CC) $(CFLAGS) -c $< -o $@

.PHONY: clean install
clean:
	rm -rf objs/*